# -*- coding: utf-8 -*-
# @Time : 2021/9/17 22:57
# @Author : 阿怪
# @Email : 673691277@qq.com
# @File : util.py
# @Project : mryx_test
'''把str转换为float'''


def str_float(a):
    '''把str转换为float'''
    priceZ = int(a.split('.')[0])  # string的整数部分
    priceX = int(a.split('.')[1]) / 10  # string的小数部分,转成整型
    if priceX>1:
        priceX = priceX/10
    price1 = priceZ + priceX
    return price1

def send_keys(driver,locator,string):
    '''输入框输入文字'''
    element = driver.find_element(*locator)
    element.click()
    element.send_keys(string)